Integrand size = 18, antiderivative size = 296 \[ \int \frac {e+f x}{(a+b \cos (c+d x))^2} \, dx=-\frac {i a (e+f x) \log \left (1+\frac {b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2} d}+\frac {i a (e+f x) \log \left (1+\frac {b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2} d}-\frac {f \log (a+b \cos (c+d x))}{\left (a^2-b^2\right ) d^2}-\frac {a f \operatorname {PolyLog}\left (2,-\frac {b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2} d^2}+\frac {a f \operatorname {PolyLog}\left (2,-\frac {b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{3/2} d^2}-\frac {b (e+f x) \sin (c+d x)}{\left (a^2-b^2\right ) d (a+b \cos (c+d x))} \]
-f*ln(a+b*cos(d*x+c))/(a^2-b^2)/d^2-I*a*(f*x+e)*ln(1+b*exp(I*(d*x+c))/(a-( a^2-b^2)^(1/2)))/(a^2-b^2)^(3/2)/d+I*a*(f*x+e)*ln(1+b*exp(I*(d*x+c))/(a+(a ^2-b^2)^(1/2)))/(a^2-b^2)^(3/2)/d-a*f*polylog(2,-b*exp(I*(d*x+c))/(a-(a^2- b^2)^(1/2)))/(a^2-b^2)^(3/2)/d^2+a*f*polylog(2,-b*exp(I*(d*x+c))/(a+(a^2-b ^2)^(1/2)))/(a^2-b^2)^(3/2)/d^2-b*(f*x+e)*sin(d*x+c)/(a^2-b^2)/d/(a+b*cos( d*x+c))
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(933\) vs. \(2(296)=592\).
Time = 10.62 (sec) , antiderivative size = 933, normalized size of antiderivative = 3.15 \[ \int \frac {e+f x}{(a+b \cos (c+d x))^2} \, dx=\frac {-b d e \sin (c+d x)+b c f \sin (c+d x)-b f (c+d x) \sin (c+d x)}{(a-b) (a+b) d^2 (a+b \cos (c+d x))}+\frac {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \left (\frac {2 a (d e-c f) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b}}+f \log \left (\sec ^2\left (\frac {1}{2} (c+d x)\right )\right )-f \log \left ((a+b \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right )-\frac {i a f \left (\log \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right ) \log \left (\frac {\sqrt {a+b}-\sqrt {-a+b} \tan \left (\frac {1}{2} (c+d x)\right )}{i \sqrt {-a+b}+\sqrt {a+b}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {-a+b} \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {-a+b}-i \sqrt {a+b}}\right )\right )}{\sqrt {-a+b} \sqrt {a+b}}+\frac {i a f \left (\log \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right ) \log \left (\frac {i \left (\sqrt {a+b}+\sqrt {-a+b} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {-a+b}+i \sqrt {a+b}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {-a+b} \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {-a+b}+i \sqrt {a+b}}\right )\right )}{\sqrt {-a+b} \sqrt {a+b}}-\frac {i a f \left (\log \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right ) \log \left (\frac {\sqrt {a+b}+\sqrt {-a+b} \tan \left (\frac {1}{2} (c+d x)\right )}{i \sqrt {-a+b}+\sqrt {a+b}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {-a+b} \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {-a+b}-i \sqrt {a+b}}\right )\right )}{\sqrt {-a+b} \sqrt {a+b}}+\frac {i a f \left (\log \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right ) \log \left (\frac {i \left (\sqrt {a+b}-\sqrt {-a+b} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {-a+b}+i \sqrt {a+b}}\right )+\operatorname {PolyLog}\left (2,\frac {\sqrt {-a+b} \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\sqrt {-a+b}+i \sqrt {a+b}}\right )\right )}{\sqrt {-a+b} \sqrt {a+b}}\right ) (a d e+a d f x+b f \sin (c+d x)) \left (\sqrt {a+b}-\sqrt {-a+b} \tan \left (\frac {1}{2} (c+d x)\right )\right ) \left (\sqrt {a+b}+\sqrt {-a+b} \tan \left (\frac {1}{2} (c+d x)\right )\right )}{\left (a^2-b^2\right ) d^2 (a+b \cos (c+d x)) \left (a \left (d e-c f+i f \log \left (1-i \tan \left (\frac {1}{2} (c+d x)\right )\right )-i f \log \left (1+i \tan \left (\frac {1}{2} (c+d x)\right )\right )\right )+b f \sin (c+d x)\right )} \]
(-(b*d*e*Sin[c + d*x]) + b*c*f*Sin[c + d*x] - b*f*(c + d*x)*Sin[c + d*x])/ ((a - b)*(a + b)*d^2*(a + b*Cos[c + d*x])) + (Cos[(c + d*x)/2]^2*((2*a*(d* e - c*f)*ArcTan[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]* Sqrt[a + b]) + f*Log[Sec[(c + d*x)/2]^2] - f*Log[(a + b*Cos[c + d*x])*Sec[ (c + d*x)/2]^2] - (I*a*f*(Log[1 - I*Tan[(c + d*x)/2]]*Log[(Sqrt[a + b] - S qrt[-a + b]*Tan[(c + d*x)/2])/(I*Sqrt[-a + b] + Sqrt[a + b])] + PolyLog[2, (Sqrt[-a + b]*(1 - I*Tan[(c + d*x)/2]))/(Sqrt[-a + b] - I*Sqrt[a + b])])) /(Sqrt[-a + b]*Sqrt[a + b]) + (I*a*f*(Log[1 - I*Tan[(c + d*x)/2]]*Log[(I*( Sqrt[a + b] + Sqrt[-a + b]*Tan[(c + d*x)/2]))/(Sqrt[-a + b] + I*Sqrt[a + b ])] + PolyLog[2, (Sqrt[-a + b]*(1 - I*Tan[(c + d*x)/2]))/(Sqrt[-a + b] + I *Sqrt[a + b])]))/(Sqrt[-a + b]*Sqrt[a + b]) - (I*a*f*(Log[1 + I*Tan[(c + d *x)/2]]*Log[(Sqrt[a + b] + Sqrt[-a + b]*Tan[(c + d*x)/2])/(I*Sqrt[-a + b] + Sqrt[a + b])] + PolyLog[2, (Sqrt[-a + b]*(1 + I*Tan[(c + d*x)/2]))/(Sqrt [-a + b] - I*Sqrt[a + b])]))/(Sqrt[-a + b]*Sqrt[a + b]) + (I*a*f*(Log[1 + I*Tan[(c + d*x)/2]]*Log[(I*(Sqrt[a + b] - Sqrt[-a + b]*Tan[(c + d*x)/2]))/ (Sqrt[-a + b] + I*Sqrt[a + b])] + PolyLog[2, (Sqrt[-a + b]*(1 + I*Tan[(c + d*x)/2]))/(Sqrt[-a + b] + I*Sqrt[a + b])]))/(Sqrt[-a + b]*Sqrt[a + b]))*( a*d*e + a*d*f*x + b*f*Sin[c + d*x])*(Sqrt[a + b] - Sqrt[-a + b]*Tan[(c + d *x)/2])*(Sqrt[a + b] + Sqrt[-a + b]*Tan[(c + d*x)/2]))/((a^2 - b^2)*d^2*(a + b*Cos[c + d*x])*(a*(d*e - c*f + I*f*Log[1 - I*Tan[(c + d*x)/2]] - I*...
Time = 1.18 (sec) , antiderivative size = 306, normalized size of antiderivative = 1.03, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {3042, 3805, 25, 3042, 3147, 16, 3802, 2694, 27, 2620, 2715, 2838}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {e+f x}{(a+b \cos (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {e+f x}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 3805 |
\(\displaystyle \frac {a \int \frac {e+f x}{a+b \cos (c+d x)}dx}{a^2-b^2}-\frac {b f \int -\frac {\sin (c+d x)}{a+b \cos (c+d x)}dx}{d \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a \int \frac {e+f x}{a+b \cos (c+d x)}dx}{a^2-b^2}+\frac {b f \int \frac {\sin (c+d x)}{a+b \cos (c+d x)}dx}{d \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \int \frac {e+f x}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}+\frac {b f \int \frac {\cos \left (c+d x-\frac {\pi }{2}\right )}{a-b \sin \left (c+d x-\frac {\pi }{2}\right )}dx}{d \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 3147 |
\(\displaystyle -\frac {f \int \frac {1}{a+b \cos (c+d x)}d(b \cos (c+d x))}{d^2 \left (a^2-b^2\right )}+\frac {a \int \frac {e+f x}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 16 |
\(\displaystyle \frac {a \int \frac {e+f x}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {f \log (a+b \cos (c+d x))}{d^2 \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 3802 |
\(\displaystyle \frac {2 a \int \frac {e^{i (c+d x)} (e+f x)}{2 e^{i (c+d x)} a+b e^{2 i (c+d x)}+b}dx}{a^2-b^2}-\frac {f \log (a+b \cos (c+d x))}{d^2 \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 2694 |
\(\displaystyle \frac {2 a \left (\frac {b \int \frac {e^{i (c+d x)} (e+f x)}{2 \left (a+b e^{i (c+d x)}-\sqrt {a^2-b^2}\right )}dx}{\sqrt {a^2-b^2}}-\frac {b \int \frac {e^{i (c+d x)} (e+f x)}{2 \left (a+b e^{i (c+d x)}+\sqrt {a^2-b^2}\right )}dx}{\sqrt {a^2-b^2}}\right )}{a^2-b^2}-\frac {f \log (a+b \cos (c+d x))}{d^2 \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2 a \left (\frac {b \int \frac {e^{i (c+d x)} (e+f x)}{a+b e^{i (c+d x)}-\sqrt {a^2-b^2}}dx}{2 \sqrt {a^2-b^2}}-\frac {b \int \frac {e^{i (c+d x)} (e+f x)}{a+b e^{i (c+d x)}+\sqrt {a^2-b^2}}dx}{2 \sqrt {a^2-b^2}}\right )}{a^2-b^2}-\frac {f \log (a+b \cos (c+d x))}{d^2 \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle \frac {2 a \left (\frac {b \left (\frac {i f \int \log \left (\frac {e^{i (c+d x)} b}{a-\sqrt {a^2-b^2}}+1\right )dx}{b d}-\frac {i (e+f x) \log \left (1+\frac {b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {b \left (\frac {i f \int \log \left (\frac {e^{i (c+d x)} b}{a+\sqrt {a^2-b^2}}+1\right )dx}{b d}-\frac {i (e+f x) \log \left (1+\frac {b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{a^2-b^2}-\frac {f \log (a+b \cos (c+d x))}{d^2 \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle \frac {2 a \left (\frac {b \left (\frac {f \int e^{-i (c+d x)} \log \left (\frac {e^{i (c+d x)} b}{a-\sqrt {a^2-b^2}}+1\right )de^{i (c+d x)}}{b d^2}-\frac {i (e+f x) \log \left (1+\frac {b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {b \left (\frac {f \int e^{-i (c+d x)} \log \left (\frac {e^{i (c+d x)} b}{a+\sqrt {a^2-b^2}}+1\right )de^{i (c+d x)}}{b d^2}-\frac {i (e+f x) \log \left (1+\frac {b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{a^2-b^2}-\frac {f \log (a+b \cos (c+d x))}{d^2 \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {2 a \left (\frac {b \left (-\frac {f \operatorname {PolyLog}\left (2,-\frac {b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d^2}-\frac {i (e+f x) \log \left (1+\frac {b e^{i (c+d x)}}{a-\sqrt {a^2-b^2}}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}-\frac {b \left (-\frac {f \operatorname {PolyLog}\left (2,-\frac {b e^{i (c+d x)}}{a+\sqrt {a^2-b^2}}\right )}{b d^2}-\frac {i (e+f x) \log \left (1+\frac {b e^{i (c+d x)}}{\sqrt {a^2-b^2}+a}\right )}{b d}\right )}{2 \sqrt {a^2-b^2}}\right )}{a^2-b^2}-\frac {f \log (a+b \cos (c+d x))}{d^2 \left (a^2-b^2\right )}-\frac {b (e+f x) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
-((f*Log[a + b*Cos[c + d*x]])/((a^2 - b^2)*d^2)) + (2*a*((b*(((-I)*(e + f* x)*Log[1 + (b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2])])/(b*d) - (f*PolyLog[ 2, -((b*E^(I*(c + d*x)))/(a - Sqrt[a^2 - b^2]))])/(b*d^2)))/(2*Sqrt[a^2 - b^2]) - (b*(((-I)*(e + f*x)*Log[1 + (b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^ 2])])/(b*d) - (f*PolyLog[2, -((b*E^(I*(c + d*x)))/(a + Sqrt[a^2 - b^2]))]) /(b*d^2)))/(2*Sqrt[a^2 - b^2])))/(a^2 - b^2) - (b*(e + f*x)*Sin[c + d*x])/ ((a^2 - b^2)*d*(a + b*Cos[c + d*x]))
3.2.89.3.1 Defintions of rubi rules used
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.) *(F_)^(v_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*(c/q) Int [(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Simp[2*(c/q) Int[(f + g*x) ^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[ v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m _.), x_Symbol] :> Simp[1/(b^p*f) Subst[Int[(a + x)^m*(b^2 - x^2)^((p - 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + Pi*(k_.) + (f_.)*( x_)]), x_Symbol] :> Simp[2 Int[(c + d*x)^m*E^(I*Pi*(k - 1/2))*(E^(I*(e + f*x))/(b + 2*a*E^(I*Pi*(k - 1/2))*E^(I*(e + f*x)) - b*E^(2*I*k*Pi)*E^(2*I*( e + f*x)))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[2*k] && NeQ [a^2 - b^2, 0] && IGtQ[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^2, x_ Symbol] :> Simp[b*(c + d*x)^m*(Cos[e + f*x]/(f*(a^2 - b^2)*(a + b*Sin[e + f *x]))), x] + (Simp[a/(a^2 - b^2) Int[(c + d*x)^m/(a + b*Sin[e + f*x]), x] , x] - Simp[b*d*(m/(f*(a^2 - b^2))) Int[(c + d*x)^(m - 1)*(Cos[e + f*x]/( a + b*Sin[e + f*x])), x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 673 vs. \(2 (270 ) = 540\).
Time = 3.34 (sec) , antiderivative size = 674, normalized size of antiderivative = 2.28
method | result | size |
risch | \(\frac {2 i \left (f x +e \right ) \left (a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}{d \left (-a^{2}+b^{2}\right ) \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}-\frac {2 f \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{\left (-a^{2}+b^{2}\right ) d^{2}}+\frac {f \ln \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}{\left (-a^{2}+b^{2}\right ) d^{2}}+\frac {2 i a e \arctan \left (\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{\left (-a^{2}+b^{2}\right )^{\frac {3}{2}} d}+\frac {i f a \ln \left (\frac {-b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {a^{2}-b^{2}}-a}{\sqrt {a^{2}-b^{2}}-a}\right ) x}{\left (-a^{2}+b^{2}\right ) d \sqrt {a^{2}-b^{2}}}-\frac {i f a \ln \left (\frac {b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {a^{2}-b^{2}}+a}{\sqrt {a^{2}-b^{2}}+a}\right ) x}{\left (-a^{2}+b^{2}\right ) d \sqrt {a^{2}-b^{2}}}+\frac {i f a \ln \left (\frac {-b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {a^{2}-b^{2}}-a}{\sqrt {a^{2}-b^{2}}-a}\right ) c}{\left (-a^{2}+b^{2}\right ) d^{2} \sqrt {a^{2}-b^{2}}}-\frac {i f a \ln \left (\frac {b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {a^{2}-b^{2}}+a}{\sqrt {a^{2}-b^{2}}+a}\right ) c}{\left (-a^{2}+b^{2}\right ) d^{2} \sqrt {a^{2}-b^{2}}}+\frac {f a \operatorname {dilog}\left (\frac {-b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {a^{2}-b^{2}}-a}{\sqrt {a^{2}-b^{2}}-a}\right )}{\left (-a^{2}+b^{2}\right ) d^{2} \sqrt {a^{2}-b^{2}}}-\frac {f a \operatorname {dilog}\left (\frac {b \,{\mathrm e}^{i \left (d x +c \right )}+\sqrt {a^{2}-b^{2}}+a}{\sqrt {a^{2}-b^{2}}+a}\right )}{\left (-a^{2}+b^{2}\right ) d^{2} \sqrt {a^{2}-b^{2}}}-\frac {2 i a f c \arctan \left (\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{\left (-a^{2}+b^{2}\right )^{\frac {3}{2}} d^{2}}\) | \(674\) |
2*I*(f*x+e)*(a*exp(I*(d*x+c))+b)/d/(-a^2+b^2)/(b*exp(2*I*(d*x+c))+2*a*exp( I*(d*x+c))+b)-2/(-a^2+b^2)/d^2*f*ln(exp(I*(d*x+c)))+1/(-a^2+b^2)/d^2*f*ln( b*exp(2*I*(d*x+c))+2*a*exp(I*(d*x+c))+b)+2*I/(-a^2+b^2)^(3/2)/d*a*e*arctan (1/2*(2*b*exp(I*(d*x+c))+2*a)/(-a^2+b^2)^(1/2))+I/(-a^2+b^2)/d*f*a/(a^2-b^ 2)^(1/2)*ln((-b*exp(I*(d*x+c))+(a^2-b^2)^(1/2)-a)/((a^2-b^2)^(1/2)-a))*x-I /(-a^2+b^2)/d*f*a/(a^2-b^2)^(1/2)*ln((b*exp(I*(d*x+c))+(a^2-b^2)^(1/2)+a)/ ((a^2-b^2)^(1/2)+a))*x+I/(-a^2+b^2)/d^2*f*a/(a^2-b^2)^(1/2)*ln((-b*exp(I*( d*x+c))+(a^2-b^2)^(1/2)-a)/((a^2-b^2)^(1/2)-a))*c-I/(-a^2+b^2)/d^2*f*a/(a^ 2-b^2)^(1/2)*ln((b*exp(I*(d*x+c))+(a^2-b^2)^(1/2)+a)/((a^2-b^2)^(1/2)+a))* c+1/(-a^2+b^2)/d^2*f*a/(a^2-b^2)^(1/2)*dilog((-b*exp(I*(d*x+c))+(a^2-b^2)^ (1/2)-a)/((a^2-b^2)^(1/2)-a))-1/(-a^2+b^2)/d^2*f*a/(a^2-b^2)^(1/2)*dilog(( b*exp(I*(d*x+c))+(a^2-b^2)^(1/2)+a)/((a^2-b^2)^(1/2)+a))-2*I/(-a^2+b^2)^(3 /2)/d^2*a*f*c*arctan(1/2*(2*b*exp(I*(d*x+c))+2*a)/(-a^2+b^2)^(1/2))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1482 vs. \(2 (266) = 532\).
Time = 0.46 (sec) , antiderivative size = 1482, normalized size of antiderivative = 5.01 \[ \int \frac {e+f x}{(a+b \cos (c+d x))^2} \, dx=\text {Too large to display} \]
-1/2*((a*b^2*f*cos(d*x + c) + a^2*b*f)*sqrt((a^2 - b^2)/b^2)*dilog(-(a*cos (d*x + c) + I*a*sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt((a ^2 - b^2)/b^2) + b)/b + 1) - (a*b^2*f*cos(d*x + c) + a^2*b*f)*sqrt((a^2 - b^2)/b^2)*dilog(-(a*cos(d*x + c) + I*a*sin(d*x + c) - (b*cos(d*x + c) + I* b*sin(d*x + c))*sqrt((a^2 - b^2)/b^2) + b)/b + 1) + (a*b^2*f*cos(d*x + c) + a^2*b*f)*sqrt((a^2 - b^2)/b^2)*dilog(-(a*cos(d*x + c) - I*a*sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt((a^2 - b^2)/b^2) + b)/b + 1) - (a*b^2*f*cos(d*x + c) + a^2*b*f)*sqrt((a^2 - b^2)/b^2)*dilog(-(a*cos(d*x + c) - I*a*sin(d*x + c) - (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt((a^2 - b^2)/b^2) + b)/b + 1) - (-I*a^2*b*d*f*x - I*a^2*b*c*f + (-I*a*b^2*d*f*x - I*a*b^2*c*f)*cos(d*x + c))*sqrt((a^2 - b^2)/b^2)*log((a*cos(d*x + c) + I*a *sin(d*x + c) + (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt((a^2 - b^2)/b^2) + b)/b) - (I*a^2*b*d*f*x + I*a^2*b*c*f + (I*a*b^2*d*f*x + I*a*b^2*c*f)*cos (d*x + c))*sqrt((a^2 - b^2)/b^2)*log((a*cos(d*x + c) + I*a*sin(d*x + c) - (b*cos(d*x + c) + I*b*sin(d*x + c))*sqrt((a^2 - b^2)/b^2) + b)/b) - (I*a^2 *b*d*f*x + I*a^2*b*c*f + (I*a*b^2*d*f*x + I*a*b^2*c*f)*cos(d*x + c))*sqrt( (a^2 - b^2)/b^2)*log((a*cos(d*x + c) - I*a*sin(d*x + c) + (b*cos(d*x + c) - I*b*sin(d*x + c))*sqrt((a^2 - b^2)/b^2) + b)/b) - (-I*a^2*b*d*f*x - I*a^ 2*b*c*f + (-I*a*b^2*d*f*x - I*a*b^2*c*f)*cos(d*x + c))*sqrt((a^2 - b^2)/b^ 2)*log((a*cos(d*x + c) - I*a*sin(d*x + c) - (b*cos(d*x + c) - I*b*sin(d...
Timed out. \[ \int \frac {e+f x}{(a+b \cos (c+d x))^2} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {e+f x}{(a+b \cos (c+d x))^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
\[ \int \frac {e+f x}{(a+b \cos (c+d x))^2} \, dx=\int { \frac {f x + e}{{\left (b \cos \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {e+f x}{(a+b \cos (c+d x))^2} \, dx=\text {Hanged} \]